package com.tedu.bill.demo1;

/**
 * Author：毕龙
 * Date: 2024/5/21 16:45
 */
public class TestStack {
    public static void main(String[] args) {
        Stack<String> stack = new Stack<>();
        //向栈中压入一个元素
        stack.push("小华");
        //返回栈顶元素
        System.out.println(stack.peek());
        stack.push("龙龙");
        System.out.println(stack.peek());

        System.out.println(stack.size());
        stack.push("子枭");
        String pop = stack.pop();
        System.out.println(pop);

        System.out.println(stack.isEmpty());


        stack.print();
    }
}
